Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sonic-utilities]: Added commands to view acl and port running configs #557

Merged
merged 3 commits into from
Jun 25, 2019

Conversation

prprakas
Copy link
Contributor

@prprakas prprakas commented Jun 19, 2019

Follow commands are added-

  1. show runningconfiguration accesslist
  2. show runningconfiguration interface
  3. show runningconfiguration interface interfacename

Signed-off-by: Prem Prakash prprakash@linkedin.com

- What I did
Added above show commands, sonic-config-engine changes are under sonic-net/sonic-buildimage#3036

- How to verify it
Built the python-sonic-utilities deb package and installed it in the box and tested it.

- New command output (if the output of a command-line utility has changed)

admin@lnos-x1-a-csw02:~$ show runningconfiguration ?
Usage: show runningconfiguration [OPTIONS] COMMAND [ARGS]...

Show current running configuration information

Options:
-?, -h, --help Show this message and exit.

Commands:
accesslist Show acl running configuration
all Show full running configuration
bgp Show BGP running configuration
interface Show port running configuration
interfaces Show interfaces running configuration
ntp Show NTP running configuration
snmp Show SNMP information
admin@lnos-x1-a-csw02:$ show runningconfiguration accesslist
{
"ACL_RULE": {
"NO-NSW-PACL-V4|DEFAULT_DENY": {
"PACKET_ACTION": "DROP",
"IP_TYPE": "IPv4ANY",
"PRIORITY": "0"
},
"NO-NSW-PACL-V4|Rule_20": {
"PACKET_ACTION": "FORWARD",
"DST_IP": "X.X.X.0/24",
"SRC_IP": "X.X.0.0/16",
"IP_TYPE": "IPv4ANY",
"PRIORITY": "999980"
}
}
}
admin@lnos-x1-a-csw02:
$ show runningconfiguration interface
{
"PORT": {
"Ethernet0": {
"index": "1",
"lanes": "65,66,67,68",
"mtu": "9100",
"alias": "Eth1",
"admin_status": "up",
"speed": "100000"
},
"Ethernet4": {
"index": "2",
"lanes": "69,70,71,72",
"mtu": "9100",
"alias": "Eth2",
"admin_status": "up",
"speed": "100000"
},
"Ethernet8": {
"index": "3",
"lanes": "73,74,75,76",
"mtu": "9100",
"alias": "Eth3",
"admin_status": "up",
"speed": "100000"
},
"Ethernet12": {
"index": "4",
"lanes": "77,78,79,80",
"mtu": "9100",
"alias": "Eth4",
"admin_status": "up",
"speed": "100000"
},
"Ethernet16": {
"index": "5",
"lanes": "33,34,35,36",
"mtu": "9100",
"alias": "Eth5",
"admin_status": "up",
"speed": "100000"
},
"Ethernet20": {
"index": "6",
"lanes": "37,38,39,40",
"mtu": "9100",
"alias": "Eth6",
"admin_status": "up",
"speed": "100000"
},
"Ethernet24": {
"index": "7",
"lanes": "41,42,43,44",
"mtu": "9100",
"alias": "Eth7",
"admin_status": "up",
"speed": "100000"
},
"Ethernet28": {
"index": "8",
"lanes": "45,46,47,48",
"mtu": "9100",
"alias": "Eth8",
"admin_status": "up",
"speed": "100000"
},
"Ethernet32": {
"index": "9",
"lanes": "49,50,51,52",
"mtu": "9100",
"alias": "Eth9",
"admin_status": "up",
"speed": "100000"
},
"Ethernet36": {
"index": "10",
"lanes": "53,54,55,56",
"mtu": "9100",
"alias": "Eth10",
"admin_status": "up",
"speed": "100000"
},
"Ethernet40": {
"index": "11",
"lanes": "57,58,59,60",
"mtu": "9100",
"alias": "Eth11",
"admin_status": "up",
"speed": "100000"
},
"Ethernet44": {
"index": "12",
"lanes": "61,62,63,64",
"mtu": "9100",
"alias": "Eth12",
"admin_status": "up",
"speed": "100000"
},
"Ethernet48": {
"index": "13",
"lanes": "81,82,83,84",
"mtu": "9100",
"alias": "Eth13",
"admin_status": "up",
"speed": "100000"
},
"Ethernet52": {
"index": "14",
"lanes": "85,86,87,88",
"mtu": "9100",
"alias": "Eth14",
"admin_status": "up",
"speed": "100000"
},
"Ethernet56": {
"index": "15",
"lanes": "89,90,91,92",
"mtu": "9100",
"alias": "Eth15",
"admin_status": "up",
"speed": "100000"
},
"Ethernet60": {
"index": "16",
"lanes": "93,94,95,96",
"mtu": "9100",
"alias": "Eth16",
"admin_status": "up",
"speed": "100000"
},
"Ethernet64": {
"index": "17",
"lanes": "97,98,99,100",
"mtu": "9100",
"alias": "Eth17",
"admin_status": "up",
"speed": "100000"
},
"Ethernet68": {
"index": "18",
"lanes": "101,102,103,104",
"mtu": "9100",
"alias": "Eth18",
"admin_status": "up",
"speed": "100000"
},
"Ethernet72": {
"index": "19",
"lanes": "105,106,107,108",
"mtu": "9100",
"alias": "Eth19",
"admin_status": "up",
"speed": "100000"
},
"Ethernet76": {
"index": "20",
"lanes": "109,110,111,112",
"mtu": "9100",
"alias": "Eth20",
"admin_status": "up",
"speed": "100000"
},
"Ethernet80": {
"index": "21",
"lanes": "1,2,3,4",
"mtu": "9100",
"alias": "Eth21",
"admin_status": "up",
"speed": "100000"
},
"Ethernet84": {
"index": "22",
"lanes": "5,6,7,8",
"mtu": "9100",
"alias": "Eth22",
"admin_status": "up",
"speed": "100000"
},
"Ethernet88": {
"index": "23",
"lanes": "9,10,11,12",
"mtu": "9100",
"alias": "Eth23",
"admin_status": "up",
"speed": "100000"
},
"Ethernet92": {
"index": "24",
"lanes": "13,14,15,16",
"mtu": "9100",
"alias": "Eth24",
"admin_status": "up",
"speed": "100000"
},
"Ethernet96": {
"index": "25",
"lanes": "17,18,19,20",
"mtu": "9100",
"alias": "Eth25",
"admin_status": "up",
"speed": "100000"
},
"Ethernet100": {
"index": "26",
"lanes": "21,22,23,24",
"mtu": "9100",
"alias": "Eth26",
"admin_status": "up",
"speed": "100000"
},
"Ethernet104": {
"index": "27",
"lanes": "25,26,27,28",
"mtu": "9100",
"alias": "Eth27",
"admin_status": "up",
"speed": "100000"
},
"Ethernet108": {
"index": "28",
"lanes": "29,30,31,32",
"mtu": "9100",
"alias": "Eth28",
"admin_status": "up",
"speed": "100000"
},
"Ethernet112": {
"index": "29",
"lanes": "113,114,115,116",
"mtu": "9100",
"alias": "Eth29",
"admin_status": "up",
"speed": "100000"
},
"Ethernet116": {
"index": "30",
"lanes": "117,118,119,120",
"mtu": "9100",
"alias": "Eth30",
"admin_status": "up",
"speed": "100000"
},
"Ethernet120": {
"index": "31",
"lanes": "121,122,123,124",
"mtu": "9100",
"alias": "Eth31",
"admin_status": "up",
"speed": "100000"
},
"Ethernet124": {
"index": "32",
"lanes": "125,126,127,128",
"mtu": "9100",
"alias": "Eth32",
"admin_status": "up",
"speed": "100000"
}
}
}
admin@lnos-x1-a-csw02:$ ^C
admin@lnos-x1-a-csw02:
$ show runningconfiguration interface Ethernet0
{
"Ethernet0": {
"admin_status": "up",
"alias": "Eth1",
"index": "1",
"lanes": "65,66,67,68",
"mtu": "9100",
"speed": "100000"
}
}
admin@lnos-x1-a-csw02:$
admin@lnos-x1-a-csw02:
$

-->

@prprakas
Copy link
Contributor Author

retest this please

@prprakas
Copy link
Contributor Author

retest this please

1 similar comment
@prprakas
Copy link
Contributor Author

retest this please

show/main.py Outdated Show resolved Hide resolved
@jleveque jleveque merged commit dc52015 into sonic-net:master Jun 25, 2019
@prprakas prprakas deleted the run_config branch June 28, 2019 06:34
stcheng pushed a commit to stcheng/sonic-utilities that referenced this pull request Jul 2, 2019
sonic-net#557)

[show] Add commands to view acl and port running configs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants